﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BLL;
using Model;
using Tools;

namespace BWAP.Controllers
{
    public class ManageLoginController : Controller
    {
        //
        // GET: /ManageLogin/

        public ActionResult Index()
        {
            return View();
        }
        [HttpPost]
        public ActionResult ManageLogin(Admin admin)
        {
            Admin adminTwo = ManageLoginBLL.LoginVerification(admin.AdminName, admin.AdminPwd);
            if (adminTwo != null)
            {
                Session["User"] = adminTwo;
                return Content("登陆成功");
            }
            else
            {
                return Content("登陆失败");
            }

        }
    }
}
